#ifndef __CPPTUTORPOLYMORPHISM_H__
#define __CPPTUTORPOLYMORPHISM_H__

#include "cppTutorGlobals.h"
#include <string>

class CcppTutorPolyBase
{
    private:
        int m_nPolyBasePriValue;
        int *m_npPolyBasePriValue;
        static int m_nPolyBaseConstructorCount;

    public:
        int m_nPolyBasePubValue;
    
    protected:
        int m_nPolyBaseProValue;
        std::string m_strName;

    public:
        CcppTutorPolyBase ();
        CcppTutorPolyBase (std :: string);
#ifdef VIRTUAL_DESTRUCTOR
       virtual ~CcppTutorPolyBase ();
#else
        ~CcppTutorPolyBase ();
#endif

		std::string m_PolyWhoAmI ();

#ifdef VIRTUAL_FUNCTION
        virtual const char* Speak();
#else
        const char* Speak();
#endif
};

class CcppTutorPolyDerived_1 : public CcppTutorPolyBase
{
    private:
        int m_nPolyDerived_1_PriValue;
        int *m_npPolyDerived_1_PriValue;
    public:
        int m_nPolyDerived_1_PubValue;
    protected:
        int m_nPolyDerived_1_ProValue;

    public:
        CcppTutorPolyDerived_1 ();
        CcppTutorPolyDerived_1 (std :: string);
       ~CcppTutorPolyDerived_1 ();

#ifdef VIRTUAL_FUNCTION
        virtual const char* Speak();
#else
        const char* Speak();
#endif
};

class CcppTutorPolyDerived_2 : public CcppTutorPolyBase
{
    private:
        int m_nPolyDerived_2_PriValue;
    public:
        int m_nPolyDerived_2_PubValue;
    protected:
        int m_nPolyDerived_2_ProValue;

    public:
        CcppTutorPolyDerived_2 ();
        CcppTutorPolyDerived_2 (std :: string);
       ~CcppTutorPolyDerived_2 ();

#ifdef VIRTUAL_FUNCTION
        virtual const char* Speak();
#else
        const char* Speak();
#endif
};

void _Report (CcppTutorPolyBase &getReport);

#ifdef SIZE_OF_CLASS_WITH_VIRTUAL
class CcppTutorNoVirtual 
{
    private:
        int a;
    public:
        void x() const;
        int i() const;
};

#ifdef ONE_VIRTUAL
class CcppTutorOneVirtual : public CcppTutorNoVirtual
{
    private:
        //int a;
    public:
        virtual void x() const;
        //int i() const;
};
#endif //ONE_VIRTUAL

#ifdef TWO_VIRTUAL
class CcppTutorTwoVirtuals : public CcppTutorNoVirtual
{
    private:
        //int a;
    public:
        virtual void x() const;
        virtual int i() const;
};
#endif //TWO_VIRTUAL
#endif //SIZE_OF_CLASS_WITH_VIRTUAL
#endif //__CPPTUTORPOLYMORPHISM_H__